/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.fee.entity;

import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.core.persistence.DataEntity;

import javax.validation.constraints.NotNull;

/**
 * 数据源明细数值Entity
 * @author cyf
 * @version 2016-11-22
 */
public class DataValue extends DataEntity<DataValue> {
	
	private static final long serialVersionUID = 1L;
	private String value;		// 数据值
	private FeeData feeData;		// 数据源
	private DataCode feeDataCode;		// 表头
	private Integer rowNo;		// 行号
	private String idNumber;	//将该value值绑定到数据源具体某一行，对应费用明细表中具体某行数据，外部表关联到该value值使用
								//数据源id + "_" + 行号

	private String location;        //坐标 x_y x是物料位置，y是行号


	public DataValue() {
		super();
	}

	public DataValue(String id){
		super(id);
	}

	public DataValue(FeeData feeData){
		this.feeData = feeData;
	}
	public DataValue(FeeData feeData, DataCode feeDataCode){
		this.feeData = feeData;
		this.feeDataCode=feeDataCode;
	}

	@ExcelField(title="数据值", align=2, sort=7)
	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}
	
	@NotNull(message="数据源不能为空")
	@ExcelField(title="数据源", align=2, sort=8)
	public FeeData getFeeData() {
		return feeData;
	}

	public void setFeeData(FeeData feeData) {
		this.feeData = feeData;
	}
	
	@NotNull(message="表头不能为空")
	@ExcelField(title="表头", align=2, sort=9)
	public DataCode getFeeDataCode() {
		return feeDataCode;
	}

	public void setFeeDataCode(DataCode feeDataCode) {
		this.feeDataCode = feeDataCode;
	}
	
	@NotNull(message="行号不能为空")
	@ExcelField(title="行号", align=2, sort=10)
	public Integer getRowNo() {
		return rowNo;
	}

	public void setRowNo(Integer rowNo) {
		this.rowNo = rowNo;
	}

	public String getIdNumber() {
		return idNumber;
	}

	public void setIdNumber(String idNumber) {
		this.idNumber = idNumber;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

}